import Router from 'koa-router';
import QianchuanController from "../controller/qianchuanController";

const router = new Router();

router.prefix('/api/qianchuan');

router
  /**
   * @swagger
   * /api/qianchuan/buyinfo:
   *   get: 
   *     description: 千川 
   *     tags: [千川] 
   *     summary: "千川获取用户订购信息"
   *     parameters:
   *       - name: authCode
   *         in: query
   *         description: 用户授权码
   *         required: true
   *     produces: 
   *       - application/json 
   *     responses: 
   *       200:
   *         description: 获取数据列表 
   * */
  .get('/buyinfo', QianchuanController.buyinfo)
  /**
   * @swagger
   * /api/qianchuan/useCodeBuy:
   *   get: 
   *     description: 使用兑换码 
   *     tags: [千川] 
   *     summary: "使用兑换码"
   *     parameters:
   *       - name: authCode
   *         in: query
   *         description: 用户授权码
   *         required: true
   *     produces: 
   *       - application/json 
   *     responses: 
   *       200:
   *         description: 获取数据列表 
   * */
  .post('/useCodeBuy', QianchuanController.useCodeBuy)



export default router;